package com.tuanzi.loan.web.lazy.xhh.settlementsystem;

import com.tuanzi.loan.business.service.xhh.settlementsystem.XhhSettlementProductService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.xhh.settlementsystem.XhhSettlementProductRequest;
import com.tuanzi.loan.vo.response.xhh.settlementsystem.XhhSettlementProductResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-01-25 20:17
 */
public class XhhSettlementProductLazyDataModel extends BaseLazyDataModel<XhhSettlementProductRequest, XhhSettlementProductResponse> {
    private XhhSettlementProductService xhhSettlementProductService = SpringContextHolder.getBean(XhhSettlementProductService.class);
    public XhhSettlementProductLazyDataModel(XhhSettlementProductRequest settlementProductRequest) {
        super(settlementProductRequest);
    }
    @Override
    protected Page<XhhSettlementProductResponse> doLoad(PageSearcher<XhhSettlementProductRequest> pageSearcher) {
        return xhhSettlementProductService.list(pageSearcher);
    }
}
